<template>
	<div class="app-containers">
		<el-form :model="queryParams" ref="queryForms" size="small" :inline="true" v-show="showSearch"
			label-width="68px">
			<el-form-item label="返修单号" prop="repairNumber">
				<el-input style="width: 200px" v-model="queryParams.repairNumber" placeholder="请输入返修单号" clearable
					maxlength="20" show-word-limit @keyup.enter.native="handleQuery" />
			</el-form-item>
			<el-form-item label="产品名称" prop="productName">
				<el-input style="width: 200px" v-model="queryParams.productName" placeholder="请输入产品名称" clearable
					maxlength="20" show-word-limit @keyup.enter.native="handleQuery" />
			</el-form-item>
			<el-form-item label="产品型号" prop="productModel">
				<el-input style="width: 200px" v-model="queryParams.productModel" placeholder="请输入产品型号" clearable
					maxlength="20" show-word-limit @keyup.enter.native="handleQuery" />
			</el-form-item>
			<el-form-item label="产品编号" prop="productNumber">
				<el-input style="width: 200px" v-model="queryParams.productNumber" placeholder="请输入产品编号" clearable
					maxlength="20" show-word-limit @keyup.enter.native="handleQuery" />
			</el-form-item>
			<el-form-item>
				<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
				<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
				<el-button icon="el-icon-refresh" size="mini" @click="resetQueryAll">清空</el-button>
				<el-button size="mini" @click="showVisible">显示/隐藏</el-button>
			</el-form-item>
		</el-form>
		<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
			label-width="110px" v-if="hasShowVisible">
			<el-form-item label="用户" prop="clientName">
				<el-input style="width: 200px" v-model="queryParams.clientName" placeholder="请输入用户" clearable
					maxlength="20" show-word-limit @keyup.enter.native="handleQuery" />
			</el-form-item>
			<el-form-item label="产品代表" prop="productRepresentativeName">
				<el-input style="width: 200px" v-model="queryParams.productRepresentativeName" placeholder="请输入产品代表"
					clearable maxlength="20" show-word-limit @keyup.enter.native="handleQuery" />
			</el-form-item>
			<el-form-item label="维修类别" prop="maintenanceCategoryName">
				<el-input style="width: 200px" v-model="queryParams.maintenanceCategoryName" placeholder="请输入维修类别"
					clearable maxlength="20" show-word-limit @keyup.enter.native="handleQuery" />
			</el-form-item>
			<el-form-item label="故障模式" prop="failureMode">
				<el-input style="width: 200px" v-model="queryParams.failureMode" placeholder="请输入故障模式" clearable
					maxlength="200" show-word-limit @keyup.enter.native="handleQuery" />
			</el-form-item>
			<el-form-item label="履历本情况" prop="curriculumVitae">
				<el-input style="width: 200px" v-model="queryParams.curriculumVitae" placeholder="请输入履历本情况" clearable
					maxlength="200" show-word-limit @keyup.enter.native="handleQuery" />
			</el-form-item>
			<el-form-item label="核故情况" prop="failureRemark">
				<el-input style="width: 200px" v-model="queryParams.failureRemark" placeholder="请输入核故情况" clearable
					maxlength="200" show-word-limit @keyup.enter.native="handleQuery" />
			</el-form-item>
			<el-form-item label="工艺通知单编号" prop="processNumber">
				<el-input style="width: 200px" v-model="queryParams.processNumber" placeholder="请输入工艺通知单编号" clearable
					maxlength="20" show-word-limit @keyup.enter.native="handleQuery" />
			</el-form-item>
			<el-form-item label="修理注意事项" prop="repairPrecautions">
				<el-input style="width: 200px" v-model="queryParams.repairPrecautions" placeholder="请输入修理注意事项" clearable
					maxlength="20" show-word-limit @keyup.enter.native="handleQuery" />
			</el-form-item>
			<el-form-item label="3B任务号" prop="bNumber">
				<el-input style="width: 200px" v-model="queryParams.bNumber" placeholder="请输入3B任务号" clearable
					maxlength="20" show-word-limit @keyup.enter.native="handleQuery" />
			</el-form-item>
			<el-form-item label="特殊情况" prop="specialCondition">
				<el-input style="width: 200px" v-model="queryParams.specialCondition" placeholder="请输入特殊情况" clearable
					maxlength="20" show-word-limit @keyup.enter.native="handleQuery" />
			</el-form-item>
			<el-form-item label="退修原因" prop="retirementRepairReason">
				<el-input style="width: 200px" v-model="queryParams.retirementRepairReason" placeholder="请输入退修原因"
					clearable maxlength="20" show-word-limit @keyup.enter.native="handleQuery" />
			</el-form-item>
			<el-form-item label="是否特殊情况" prop="specialStatus">
				<el-select v-model="queryParams.specialStatus">
					<el-option v-for="item in specialStatusList" :key="item.id" :value="item.id"
						:label="item.name"></el-option>
				</el-select>
			</el-form-item>
			<el-form-item label="是否急件" prop="urgencyFlag">
				<el-select v-model="queryParams.urgencyFlag">
					<el-option v-for="item in urgencyFlagList" :key="item.id" :value="item.id"
						:label="item.name"></el-option>
				</el-select>
			</el-form-item>
			<el-form-item label="退修状态" prop="retirementRepairlStatus">
				<el-select v-model="queryParams.retirementRepairlStatus">
					<el-option v-for="item in retirementRepairlStatusList" :key="item.id" :value="item.id"
						:label="item.name"></el-option>
				</el-select>
			</el-form-item>
			<el-form-item label="产品接收" prop="receiptTime">
				<el-date-picker style="width: 250px" v-model="value1" type="daterange" range-separator="至"
					value-format="yyyy-MM-dd" format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期">
				</el-date-picker>
			</el-form-item>
			<el-form-item label="故障核实" prop="malfunctionVerifyTime">
				<el-date-picker style="width: 250px" v-model="value2" type="daterange" range-separator="至"
					value-format="yyyy-MM-dd" format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期">
				</el-date-picker>
			</el-form-item>
			<el-form-item label="故障核查单" prop="maintenanceTicketTime">
				<el-date-picker style="width: 250px" v-model="value3" type="daterange" range-separator="至"
					value-format="yyyy-MM-dd" format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期">
				</el-date-picker>
			</el-form-item>
			<el-form-item label="下发工艺通知单" prop="processNumberTime">
				<el-date-picker style="width: 250px" v-model="value4" type="daterange" range-separator="至"
					value-format="yyyy-MM-dd" format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期">
				</el-date-picker>
			</el-form-item>
			<el-form-item label="分解" prop="disassembleTime">
				<el-date-picker style="width: 250px" v-model="value5" type="daterange" range-separator="至"
					value-format="yyyy-MM-dd" format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期">
				</el-date-picker>
			</el-form-item>
			<el-form-item label="清洁" prop="cleanTime">
				<el-date-picker style="width: 250px" v-model="value6" type="daterange" range-separator="至"
					value-format="yyyy-MM-dd" format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期">
				</el-date-picker>
			</el-form-item>
			<el-form-item label="外观检查" prop="appearanceInspectionTime">
				<el-date-picker style="width: 250px" v-model="value7" type="daterange" range-separator="至"
					value-format="yyyy-MM-dd" format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期">
				</el-date-picker>
			</el-form-item>
			<el-form-item label="专项检查" prop="specialExaminationTime">
				<el-date-picker style="width: 250px" v-model="value8" type="daterange" range-separator="至"
					value-format="yyyy-MM-dd" format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期">
				</el-date-picker>
			</el-form-item>
			<el-form-item label="喷漆" prop="sprayLacquerTime">
				<el-date-picker style="width: 250px" v-model="value9" type="daterange" range-separator="至"
					value-format="yyyy-MM-dd" format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期">
				</el-date-picker>
			</el-form-item>
			<el-form-item label="表面处理(电镀)" prop="surfaceTime">
				<el-date-picker style="width: 250px" v-model="value10" type="daterange" range-separator="至"
					value-format="yyyy-MM-dd" format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期">
				</el-date-picker>
			</el-form-item>
			<el-form-item label="领料单" prop="materialsTime">
				<el-date-picker style="width: 250px" v-model="value11" type="daterange" range-separator="至"
					value-format="yyyy-MM-dd" format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期">
				</el-date-picker>
			</el-form-item>
			<el-form-item label="装配试验" prop="materialsTime">
				<el-date-picker style="width: 250px" v-model="value12" type="daterange" range-separator="至"
					value-format="yyyy-MM-dd" format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期">
				</el-date-picker>
			</el-form-item>
			<el-form-item label="军检验收" prop="armyExamineTime">
				<el-date-picker style="width: 250px" v-model="value13" type="daterange" range-separator="至"
					value-format="yyyy-MM-dd" format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期">
				</el-date-picker>
			</el-form-item>
			<el-form-item label="包装" prop="packageTime">
				<el-date-picker style="width: 250px" v-model="value14" type="daterange" range-separator="至"
					value-format="yyyy-MM-dd" format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期">
				</el-date-picker>
			</el-form-item>
			<el-form-item label="发货" prop="deliverTime">
				<el-date-picker style="width: 250px" v-model="value15" type="daterange" range-separator="至"
					value-format="yyyy-MM-dd" format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期">
				</el-date-picker>
			</el-form-item>
			<el-form-item label="退修时间" prop="retirementRepairlTime">
				<el-date-picker style="width: 250px" v-model="value16" type="daterange" range-separator="至"
					value-format="yyyy-MM-dd" format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期">
				</el-date-picker>
			</el-form-item>
		</el-form>
		<el-row :gutter="10" class="mb8">
			<el-col :span="1.5">
				<div style="line-height: 30px; font-size: 15px; color: #666">生成表单</div>
			</el-col>
			<el-col :span="1.5">
				<el-select size="small" v-model="selval" @blur="handleExport" clearable>
					<el-option v-for="item in options" :key="item.id" :label="item.name" :value="item.id" />
				</el-select>
			</el-col>
			<el-col :span="1.5">
				<el-button type="info" icon="el-icon-upload2" size="mini" @click="handleImport()"
					v-hasPermi="['schedule:scheduleList:import']">导入</el-button>
			</el-col>
			<right-toolbar menuNames="scheduleList52" @changeTableData="changeTableData" :showSearch.sync="showSearch"
				@queryTable="getList" perm="schedule:scheduleList:index" :columns.sync="columns"></right-toolbar>
		</el-row>
		<div>
			<el-table @mousedown.native="mousedownTable" @row-click="row_click" @cell-mouse-enter="cell_mouse_enter"
				@cell-mouse-leave="cell_mouse_leave" @mouseup.native="mouseupTable" @mouseleave.native="mouseupTable"
				ref="table" row-key="id" :row-class-name="rowClassName" :height="heights" v-loading="loading"
				:data="configList" @selection-change="handleSelectionChange" border>
				<el-table-column type="selection" width="55" align="center" />
				<el-table-column type="index" width="55" align="center" label="序号" />
				<el-table-column label="返修任务单" prop="repairNumber" :show-overflow-tooltip="true" min-width="150"
					v-if="columns[0].visible"></el-table-column>
				<el-table-column label="产品代表" prop="productRepresentativeName" :show-overflow-tooltip="true"
					min-width="150" v-if="columns[1].visible" />
				<el-table-column label="用户" prop="clientName" :show-overflow-tooltip="true" min-width="150"
					v-if="columns[2].visible" />
				<el-table-column label="产品名称" prop="productName" :show-overflow-tooltip="true" min-width="150"
					v-if="columns[3].visible" />
				<el-table-column label="产品型号" prop="productModel" :show-overflow-tooltip="true" min-width="150"
					v-if="columns[4].visible" />
				<el-table-column label="产品编号" prop="productNumber" :show-overflow-tooltip="true" min-width="150"
					v-if="columns[5].visible">
					<template slot-scope="scope">
						<el-tooltip placement="right">
							<div slot="content" class="custom-tooltip-content">
								<div class="contentsRepairNumber">
									<div>返修任务单：{{ scope.row.repairNumber }}</div>
									<div>产品代表：{{ scope.row.productRepresentativeName }}</div>
								</div>
								<div class="contentsRepairNumber">
									<div>用户：{{ scope.row.productRepresentativeName }}</div>
									<div>产品名称：{{ scope.row.productName }}</div>
								</div>
								<div class="contentsRepairNumber">
									<div>产品型号：{{ scope.row.productModel }}</div>
									<div>产品编号：{{ scope.row.productNumber }}</div>
								</div>
								<div class="contentsRepairNumber">
									<div>产品接收：{{ scope.row.receiptTime }}</div>
									<div>故障核实：{{ scope.row.malfunctionVerifyTime }}</div>
								</div>
								<div class="contentsRepairNumber">
									<div>维修类别：{{ scope.row.maintenanceCategoryName }}</div>
									<div>故障模式：{{ scope.row.failureMode }}</div>
								</div>
								<div class="contentsRepairNumber">
									<div>履历本情况：{{ scope.row.curriculumVitae }}</div>
									<div>核故情况：{{ scope.row.failureRemark }}</div>
								</div>
								<div class="contentsRepairNumber">
									<div>故障核查单：{{ scope.row.maintenanceTicketTime }}</div>
									<div>下发工艺通知单：{{ scope.row.processNumberTime }}</div>
								</div>
								<div class="contentsRepairNumber">
									<div>工艺通知单编号：{{ scope.row.processNumber }}</div>
									<div>修理注意事项：{{ scope.row.repairPrecautions }}</div>
								</div>
								<div class="contentsRepairNumber">
									<div>3B任务号：{{ scope.row.bNumber }}</div>
									<div>分解：{{ scope.row.disassembleTime }}</div>
								</div>
								<div class="contentsRepairNumber">
									<div>外观检查：{{ scope.row.appearanceInspectionTime }}</div>
									<div>专项检查：{{ scope.row.specialExaminationTime }}</div>
								</div>
								<div class="contentsRepairNumber">
									<div>喷漆：{{ scope.row.sprayLacquerTime }}</div>
									<div>表面处理(电镀)：{{ scope.row.surfaceTime }}</div>
								</div>
								<div class="contentsRepairNumber">
									<div>领料单：{{ scope.row.materialsTime }}</div>
									<div>装配试验：{{ scope.row.assemblyTime }}</div>
								</div>
								<div class="contentsRepairNumber">
									<div>军检验收：{{ scope.row.armyExamineTime }}</div>
									<div>包装：{{ scope.row.packageTime }}</div>
								</div>
								<div class="contentsRepairNumber">
									<div>发货：{{ scope.row.deliverTime }}</div>
									<div>退修状态：{{ scope.row.retirementRepairlStatus == 0 ? "未退修" : "已退修" }}</div>
								</div>
								<div class="contentsRepairNumber">
									<div>退修时间：{{ scope.row.retirementRepairlTime }}</div>
									<div>是否急件：{{ scope.row.urgencyFlag == 0 ? "否" : "是" }}</div>
								</div>
								<div class="contentsRepairNumber">
									<div>发货：{{ scope.row.deliverTime }}</div>
									<div>是否特殊情况：{{ scope.row.specialStatus == 0 ? "否" : "是" }}</div>
								</div>
								<div class="contentsRepairNumber" style="width: 100%">
									<div>退修原因：{{ scope.row.retirementRepairReason }}</div>
								</div>
								<div class="contentsRepairNumber" style="width: 100%">
									<div>特殊情况：{{ scope.row.specialCondition }}</div>
								</div>
							</div>
							<div class="custom-tooltip-trigger">{{ scope.row.productNumber }}</div>
						</el-tooltip>
					</template>
				</el-table-column>
				<el-table-column align="center" label="产品接收" prop="receiptTime" :show-overflow-tooltip="true"
					min-width="150" v-if="columns[6].visible" />
				<el-table-column align="center" label="故障核实" prop="malfunctionVerifyTime" :show-overflow-tooltip="true"
					min-width="150" v-if="columns[7].visible" />
				<el-table-column label="维修类别" prop="maintenanceCategoryName" :show-overflow-tooltip="true"
					min-width="150" v-if="columns[8].visible" />
				<el-table-column label="故障模式" prop="failureMode" :show-overflow-tooltip="true" min-width="150"
					v-if="columns[9].visible" />
				<el-table-column label="履历本情况" prop="curriculumVitae" :show-overflow-tooltip="true" min-width="150"
					v-if="columns[10].visible" />
				<el-table-column label="核故情况" prop="failureRemark" :show-overflow-tooltip="true" min-width="150"
					v-if="columns[11].visible" />
				<el-table-column label="故障核查单" prop="maintenanceTicketTime" :show-overflow-tooltip="true"
					min-width="170" v-if="columns[12].visible" />
				<el-table-column align="center" label="下发工艺通知单" prop="processNumberTime" :show-overflow-tooltip="true"
					min-width="170" v-if="columns[13].visible" />
				<el-table-column label="工艺通知单编号" prop="processNumber" :show-overflow-tooltip="true" min-width="150"
					v-if="columns[14].visible" />
				<el-table-column label="修理注意事项" prop="repairPrecautions" :show-overflow-tooltip="true" min-width="150"
					v-if="columns[15].visible" />
				<el-table-column label="3B任务号" prop="bNumber" :show-overflow-tooltip="true" min-width="150"
					v-if="columns[16].visible" />
				<el-table-column align="center" label="分解" prop="disassembleTime" :show-overflow-tooltip="true"
					min-width="150" v-if="columns[17].visible" />
				<el-table-column align="center" label="清洁" prop="cleanTime" :show-overflow-tooltip="true"
					min-width="150" v-if="columns[18].visible" />
				<el-table-column align="center" label="外观检查" prop="appearanceInspectionTime"
					:show-overflow-tooltip="true" min-width="150" v-if="columns[19].visible" />
				<el-table-column align="center" label="专项检查" prop="specialExaminationTime" :show-overflow-tooltip="true"
					min-width="150" v-if="columns[20].visible" />
				<!-- <el-table-column label="打磨修理" prop="grindingRepairTime" :show-overflow-tooltip="true" min-width="150" v-if="columns[21].visible" /> -->
				<el-table-column align="center" label="喷漆" prop="sprayLacquerTime" :show-overflow-tooltip="true"
					min-width="150" v-if="columns[21].visible" />
				<el-table-column align="center" label="表面处理(电镀)" prop="surfaceTime" :show-overflow-tooltip="true"
					min-width="150" v-if="columns[22].visible" />
				<!-- <el-table-column label="探伤检查" prop="flawTime" :show-overflow-tooltip="true" min-width="150" v-if="columns[24].visible" /> -->
				<!-- <el-table-column label="换件单" prop="replacementTime" :show-overflow-tooltip="true" min-width="150" v-if="columns[25].visible" /> -->
				<el-table-column align="center" label="领料单" prop="materialsTime" :show-overflow-tooltip="true"
					min-width="150" v-if="columns[23].visible" />
				<el-table-column align="center" label="装配试验" prop="assemblyTime" :show-overflow-tooltip="true"
					min-width="150" v-if="columns[24].visible" />
				<el-table-column align="center" label="军检验收" prop="armyExamineTime" :show-overflow-tooltip="true"
					min-width="150" v-if="columns[25].visible" />
				<el-table-column align="center" label="包装" prop="packageTime" :show-overflow-tooltip="true"
					min-width="150" v-if="columns[26].visible" />
				<el-table-column align="center" label="发货" prop="deliverTime" :show-overflow-tooltip="true"
					min-width="150" v-if="columns[27].visible" />
				<el-table-column align="center" label="退修状态" prop="retirementRepairlStatus"
					:show-overflow-tooltip="true" min-width="150" v-if="columns[31].visible">
					<template slot-scope="scope">
						<div v-if="scope.row.retirementRepairlStatus == 0">未退修</div>
						<div v-if="scope.row.retirementRepairlStatus == 1">已退修</div>
					</template>
				</el-table-column>
				<el-table-column align="center" label="退修时间" prop="retirementRepairlTime" :show-overflow-tooltip="true"
					min-width="150" v-if="columns[33].visible" />
				<el-table-column label="退修原因" prop="retirementRepairReason" :show-overflow-tooltip="true"
					min-width="200" v-if="columns[32].visible" />
				<el-table-column align="center" label="是否特殊情况" prop="specialStatus" :show-overflow-tooltip="true"
					min-width="150" v-if="columns[28].visible">
					<template slot-scope="scope">
						<div v-if="scope.row.specialStatus == 0">否</div>
						<div v-if="scope.row.specialStatus == 1">是</div>
					</template>
				</el-table-column>
				<el-table-column label="特殊情况" prop="specialCondition" :show-overflow-tooltip="true" min-width="150"
					v-if="columns[29].visible" />
				<el-table-column align="center" label="是否急件" prop="urgencyFlag" :show-overflow-tooltip="true"
					min-width="150" v-if="columns[30].visible">
					<template slot-scope="scope">
						<div v-if="scope.row.urgencyFlag == 0">否</div>
						<div v-if="scope.row.urgencyFlag == 1">是</div>
					</template>
				</el-table-column>
				<!-- <el-table-column label="备注" prop="remark" :show-overflow-tooltip="true" min-width="150" v-if="columns[28].visible" /> -->
				<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right"
					width="200">
					<template slot-scope="scope">
						<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
							v-hasPermi="['schedule:scheduleList:edit']">修改</el-button>
						<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
							v-hasPermi="['schedule:scheduleList:remove']"
							v-if="scope.row.historyFlag == 1">删除</el-button>
						<el-button size="mini" type="text" icon="el-icon-folder" @click="handleAttachment(scope.row)"
							v-hasPermi="['schedule:scheduleList:file']">附件</el-button>
					</template>
				</el-table-column>
			</el-table>
		</div>
		<pagination menuNames="Pagination55" v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
			:limit.sync="queryParams.pageSize" @pagination="getList" />

		<el-dialog title="导出" :visible.sync="open" width="900px" append-to-body v-dialogDrag>
			<el-form ref="form" :model="form" :rules="rules" label-width="100px">
				<el-row :gutter="20">
					<el-col :span="12">
						<el-form-item label="文件名" prop="fileName">
							<el-input v-model="form.fileName" placeholder="请输入文件名" maxlength="20" show-word-limit />
						</el-form-item>
					</el-col>
					<el-col :span="12">
						<el-form-item label="标签页名称" prop="sheetName">
							<el-input v-model="form.sheetName" placeholder="请输入标签页名称" maxlength="20" show-word-limit />
						</el-form-item>
					</el-col>
				</el-row>
				<el-row :gutter="20">
					<el-col :span="24">
						<el-form-item label="字段名" prop="names">
							<el-select v-model="names" multiple style="width: 90%" clearable>
								<el-option v-for="item in columnList" :key="item.id" :label="item.name"
									:value="item.id"></el-option>
							</el-select>
							<el-button @click="selectAll" size="mini" style="margin-left: 10px">全选</el-button>
						</el-form-item>
					</el-col>
				</el-row>
			</el-form>
			<div slot="footer" class="dialog-footer">
				<el-button type="primary" @click="submitForm">确 定</el-button>
				<el-button @click="cancel">取 消</el-button>
			</div>
		</el-dialog>
		<el-dialog title="修改" :visible.sync="openedit" width="900px" append-to-body v-dialogDrag>
			<el-form ref="form" :model="editForm" label-width="120px">
				<div class="add-form2" v-if="editForm.historyFlag == 1">
					<el-form-item label="返修任务单" prop="repairNumber">
						<el-input v-model="editForm.repairNumber" placeholder="请输入返修任务单" maxlength="200"
							show-word-limit />
					</el-form-item>
					<el-form-item label="产品代表" prop="productRepresentativeName">
						<el-input v-model="editForm.productRepresentativeName" placeholder="请输入产品代表" maxlength="200"
							show-word-limit />
					</el-form-item>
					<el-form-item label="用户" prop="clientName">
						<el-input v-model="editForm.clientName" placeholder="请输入用户" maxlength="200" show-word-limit />
					</el-form-item>
					<el-form-item label="产品名称" prop="productName">
						<el-input v-model="editForm.productName" placeholder="请输入产品名称" maxlength="200"
							show-word-limit />
					</el-form-item>
					<el-form-item label="产品型号" prop="productModel">
						<el-input v-model="editForm.productModel" placeholder="请输入产品型号" maxlength="200"
							show-word-limit />
					</el-form-item>
					<el-form-item label="产品编号" prop="productNumber">
						<el-input v-model="editForm.productNumber" placeholder="请输入产品编号" maxlength="200"
							show-word-limit />
					</el-form-item>
					<el-form-item label="产品接收" prop="receiptTime">
						<el-date-picker v-model="editForm.receiptTime" type="date" placeholder="选择日期"
							format="yyyy-MM-dd" value-format="yyyy-MM-dd"> </el-date-picker>
					</el-form-item>
					<el-form-item label="故障核实" prop="malfunctionVerifyTime">
						<el-date-picker v-model="editForm.malfunctionVerifyTime" type="date" placeholder="选择日期"
							format="yyyy-MM-dd" value-format="yyyy-MM-dd"> </el-date-picker>
					</el-form-item>
					<el-form-item label="维修类别" prop="maintenanceCategoryName">
						<el-input v-model="editForm.maintenanceCategoryName" placeholder="请输入维修类别" maxlength="200"
							show-word-limit />
					</el-form-item>
					<el-form-item label="核故情况" prop="failureRemark">
						<el-input v-model="editForm.failureRemark" placeholder="请输入核故情况" maxlength="200"
							show-word-limit />
					</el-form-item>
					<el-form-item label="故障核查单" prop="maintenanceTicketTime">
						<el-date-picker v-model="editForm.maintenanceTicketTime" type="date" placeholder="选择日期"
							format="yyyy-MM-dd" value-format="yyyy-MM-dd"> </el-date-picker>
					</el-form-item>
					<el-form-item label="下发工艺通知单" prop="processNumberTime">
						<el-date-picker v-model="editForm.processNumberTime" type="date" placeholder="选择日期"
							format="yyyy-MM-dd" value-format="yyyy-MM-dd"> </el-date-picker>
					</el-form-item>
					<el-form-item label="工艺通知单编号" prop="processNumber">
						<el-input v-model="editForm.processNumber" placeholder="请输入工艺通知单编号" maxlength="200"
							show-word-limit />
					</el-form-item>
					<el-form-item label="3B任务号" prop="bNumber">
						<el-input v-model="editForm.bNumber" placeholder="请输入3B任务号" maxlength="200" show-word-limit />
					</el-form-item>
					<el-form-item label="故障模式" prop="failureMode">
						<el-input v-model="editForm.failureMode" placeholder="请输入故障模式" maxlength="200"
							show-word-limit />
					</el-form-item>
					<el-form-item label="退休时间" prop="retirementRepairlTime">
						<el-date-picker v-model="editForm.retirementRepairlTime" type="date" placeholder="选择日期"
							format="yyyy-MM-dd" value-format="yyyy-MM-dd"> </el-date-picker>
					</el-form-item>
					<el-form-item label="退休原因" prop="retirementRepairReason">
						<el-input v-model="editForm.retirementRepairReason" placeholder="请输入退休原因" maxlength="200"
							show-word-limit />
					</el-form-item>

					<el-form-item label="退休状态" prop="retirementRepairlStatus">
						<el-select v-model="editForm.retirementRepairlStatus"> <el-option
								v-for="item in retirementRepairlStatusList" :key="item.id" :label="item.name"
								:value="item.id"></el-option> </el-select>
					</el-form-item>
				</div>
				<div class="add-form2">
					<el-form-item label="修理注意事项" prop="repairPrecautions">
						<el-input v-model="editForm.repairPrecautions" placeholder="请输入修理注意事项" maxlength="200"
							show-word-limit />
					</el-form-item>
					<el-form-item label="履历本情况" prop="curriculumVitae">
						<el-input v-model="editForm.curriculumVitae" placeholder="请输入履历本情况" maxlength="20"
							show-word-limit />
					</el-form-item>
					<el-form-item label="分解" prop="disassembleTime">
						<el-date-picker v-model="editForm.disassembleTime" type="date" placeholder="选择日期"
							format="yyyy-MM-dd" value-format="yyyy-MM-dd"> </el-date-picker>
					</el-form-item>
					<el-form-item label="清洁" prop="cleanTime">
						<el-date-picker v-model="editForm.cleanTime" type="date" placeholder="选择日期" format="yyyy-MM-dd"
							value-format="yyyy-MM-dd"> </el-date-picker>
					</el-form-item>
					<el-form-item label="外观检查" prop="appearanceInspectionTime">
						<el-date-picker v-model="editForm.appearanceInspectionTime" type="date" placeholder="选择日期"
							format="yyyy-MM-dd" value-format="yyyy-MM-dd"> </el-date-picker>
					</el-form-item>
					<el-form-item label="专项检查" prop="specialExaminationTime">
						<el-date-picker v-model="editForm.specialExaminationTime" type="date" placeholder="选择日期"
							format="yyyy-MM-dd" value-format="yyyy-MM-dd"> </el-date-picker>
					</el-form-item>
					<el-form-item label="喷漆" prop="sprayLacquerTime">
						<el-date-picker v-model="editForm.sprayLacquerTime" type="date" placeholder="选择日期"
							format="yyyy-MM-dd" value-format="yyyy-MM-dd"> </el-date-picker>
					</el-form-item>
					<el-form-item label="表面处理(电镀)" prop="surfaceTime">
						<el-date-picker v-model="editForm.surfaceTime" type="date" placeholder="选择日期"
							format="yyyy-MM-dd" value-format="yyyy-MM-dd"> </el-date-picker>
					</el-form-item>
					<el-form-item label="领料单" prop="materialsTime">
						<el-date-picker v-model="editForm.materialsTime" type="date" placeholder="选择日期"
							format="yyyy-MM-dd" value-format="yyyy-MM-dd"> </el-date-picker>
					</el-form-item>
					<el-form-item label="装配试验" prop="assemblyTime">
						<el-date-picker v-model="editForm.assemblyTime" type="date" placeholder="选择日期"
							format="yyyy-MM-dd" value-format="yyyy-MM-dd"> </el-date-picker>
					</el-form-item>
					<el-form-item label="军检验收" prop="armyExamineTime">
						<el-date-picker v-model="editForm.armyExamineTime" type="date" placeholder="选择日期"
							format="yyyy-MM-dd" value-format="yyyy-MM-dd"> </el-date-picker>
					</el-form-item>
					<el-form-item label="包装" prop="packageTime">
						<el-date-picker v-model="editForm.packageTime" type="date" placeholder="选择日期"
							format="yyyy-MM-dd" value-format="yyyy-MM-dd"> </el-date-picker>
					</el-form-item>

					<el-form-item label="发货" prop="deliverTime">
						<el-date-picker v-model="editForm.deliverTime" type="date" placeholder="选择日期"
							format="yyyy-MM-dd" value-format="yyyy-MM-dd"> </el-date-picker>
					</el-form-item>
					<el-form-item label="是否特殊情况" prop="specialStatus">
						<el-select v-model="editForm.specialStatus">
							<el-option v-for="item in specialStatusList" :key="item.id" :label="item.name"
								:value="item.id"></el-option>
						</el-select>
					</el-form-item>
					<el-form-item label="特殊情况" prop="specialCondition">
						<el-input v-model="editForm.specialCondition" placeholder="请输入特殊情况" maxlength="200"
							show-word-limit />
					</el-form-item>
					<el-form-item label="是否急件" prop="urgencyFlag">
						<el-select v-model="editForm.urgencyFlag"> <el-option v-for="item in urgencyFlagList"
								:key="item.id" :label="item.name" :value="item.id"></el-option> </el-select>
					</el-form-item>
				</div>
			</el-form>
			<div slot="footer" class="dialog-footer">
				<el-button type="primary" @click="submitFormEdit">确 定</el-button>
				<el-button @click="openedit = false">取 消</el-button>
			</div>
		</el-dialog>

		<el-dialog :title="ImportTitle" :visible.sync="ImportOpen" width="400px" append-to-body v-dialogDrag>
			<ImportTemplete :downLoadTemplete="downLoadTemplete" :importUrl="importUrl" @closeOpen="closeOpen"
				:selectData="ids"></ImportTemplete>
		</el-dialog>
	</div>
</template>

<script>
import { repairProductSumList, getrepairProduct, updaterepairProduct } from "@/api/scheduleList"
import { downloadFileGET } from "@/utils/requestBlob"
import ImportTemplete from "@/views/components/ImportTemplete"
import { delRepairProduct } from "@/api/repair/repairProduct"
import { getcolumn } from "@/api/selectList"
import searchStateMixin from '@/layout/mixin/searchStateMixin.js'    
export default {
	name: "Schedule",
	components: { ImportTemplete },
	mixins: [searchStateMixin],    
	data() {
		return {
			// 导入产品接口
			importUrl: "/erp/repairProduct/importData",
			downLoadTemplete: {
				url: "/erp/repairProduct/importTemplate",
				title: "返修产品_模板"
			},
			// 导入产品
			ImportOpen: false,
			ImportTitle: "导入产品",
			rows: [],
			currentEnterRow: null,
			isMousedownTable: null,

			retirementRepairlStatusList: [
				{ id: "0", name: "未退修" },
				{ id: "1", name: "已退修" }
			],
			heights: "72vh",
			hasShowVisible: false,
			value1: [],
			value2: [],
			value3: [],
			value4: [],
			value5: [],
			value6: [],
			value7: [],
			value8: [],
			value9: [],
			value10: [],
			value11: [],
			value12: [],
			value13: [],
			value14: [],
			value15: [],
			value16: [],
			openedit: false,
			specialStatusList: [
				{
					id: "0",
					name: "否"
				},
				{
					id: "1",
					name: "是"
				}
			],
			urgencyFlagList: [
				{
					id: "0",
					name: "否"
				},
				{
					id: "1",
					name: "是"
				}
			],
			editForm: {},
			selval: "",
			options: [
				{
					id: "1",
					name: "导出返修单"
				}
			],
			names: [],
			columnList: [
				{
					id: "repairNumber",
					name: "返修任务单"
				},
				{
					id: "productRepresentativeName",
					name: "产品代表"
				},
				{
					id: "clientName",
					name: "用户"
				},
				{
					id: "productName",
					name: "产品名称"
				},
				{
					id: "productModel",
					name: "产品型号"
				},
				{
					id: "productNumber",
					name: "产品编号"
				},
				{
					id: "receiptTime",
					name: "产品接收"
				},
				{
					id: "malfunctionVerifyTime",
					name: "核实故障"
				},
				{
					id: "maintenanceCategoryName",
					name: "维修类别"
				},
				{
					id: "failureMode",
					name: "故障模式"
				},
				{
					id: "curriculumVitae",
					name: "履历本情况"
				},
				{
					id: "failureRemark",
					name: "核故情况"
				},
				{
					id: "maintenanceTicketTime",
					name: "故障核查单"
				},
				{
					id: "processNumberTime",
					name: "下发工艺通知单"
				},
				{
					id: "processNumber",
					name: "工艺通知单编号"
				},
				{
					id: "repairPrecautions",
					name: "修理注意事项"
				},
				{
					id: "bNumber",
					name: "3B任务号"
				},
				{
					id: "disassembleTime",
					name: "分解"
				},
				{
					id: "cleanTime",
					name: "清洁"
				},
				{
					id: "appearanceInspectionTime",
					name: "外观检查"
				},
				{
					id: "specialExaminationTime",
					name: "专项检查"
				},
				{
					id: "sprayLacquerTime",
					name: "喷漆"
				},
				{
					id: "surfaceTime",
					name: "表面处理(电镀)"
				},
				{
					id: "materialsTime",
					name: "领料单"
				},
				{
					id: "assemblyTime",
					name: "装配实验"
				},
				{
					id: "armyExamineTime",
					name: "军检验收"
				},
				{
					id: "packageTime",
					name: "包装"
				},
				{
					id: "deliverTime",
					name: "发货"
				},
				{
					id: "specialStatus",
					name: "特殊情况标志"
				},
				{
					id: "specialCondition",
					name: "特殊情况"
				},
				{
					id: "urgencyFlag",
					name: "是否急件"
				},
				{
					id: "retirementRepairlStatus",
					name: "退修状态"
				},
				{
					id: "retirementRepairReason",
					name: "退修原因"
				},
				{
					id: "retirementRepairlTime",
					name: "退修时间"
				}
				// {
				// 	id: "remark",
				// 	name: "备注"
				// }
			],
			rules: {
				fileName: [{ required: true, message: "文件名称不能为空", trigger: "blur" }],
				sheetName: [{ required: true, message: "标签页名称不能为空", trigger: "blur" }]
			},
			// 列信息
			columns: [
				{ key: 0, label: `返修任务单`, visible: true },
				{ key: 1, label: `产品代表`, visible: true },
				{ key: 2, label: `用户`, visible: true },
				{ key: 3, label: `产品名称`, visible: true },
				{ key: 4, label: `产品型号`, visible: true },
				{ key: 5, label: `产品编号`, visible: true },
				{ key: 6, label: `产品接收`, visible: true },
				{ key: 7, label: `核实故障`, visible: true },
				{ key: 8, label: `维修类别`, visible: true },
				{ key: 9, label: `故障模式`, visible: true },
				{ key: 10, label: `履历本情况`, visible: true },
				{ key: 11, label: `核故情况`, visible: true },
				{ key: 12, label: `故障核查单`, visible: true },
				{ key: 13, label: `下发工艺通知单`, visible: true },
				{ key: 14, label: `工艺通知单编号`, visible: true },
				{ key: 15, label: `修理注意事项`, visible: true },
				{ key: 16, label: `3B任务号`, visible: true },
				{ key: 17, label: `分解`, visible: true },
				{ key: 18, label: `清洁`, visible: true },
				{ key: 19, label: `外观检查`, visible: true },
				{ key: 20, label: `专项检查`, visible: true },
				// { key: 21, label: `打磨修理`, visible: true },
				{ key: 21, label: `喷漆`, visible: true },
				{ key: 22, label: `表面处理(电镀)`, visible: true },
				// { key: 24, label: `探伤检查`, visible: true },
				// { key: 25, label: `换件单`, visible: true },
				{ key: 23, label: `领料单`, visible: true },
				{ key: 24, label: `装配实验`, visible: true },
				{ key: 25, label: `军检验收`, visible: true },
				{ key: 26, label: `包装`, visible: true },
				{ key: 27, label: `发货`, visible: true },
				{ key: 28, label: `是否特殊情况`, visible: true },
				{ key: 29, label: `特殊情况`, visible: true },
				{ key: 30, label: `是否急件`, visible: true },
				{ key: 31, label: `退修状态`, visible: true },
				{ key: 32, label: `退修原因`, visible: true },
				{ key: 33, label: `退修时间`, visible: true }
			],
			// 遮罩层
			loading: true,
			// 选中数组
			ids: [],
			// 非单个禁用
			single: true,
			// 非多个禁用
			multiple: true,
			// 显示搜索条件
			showSearch: true,
			// 总条数
			total: 0,
			// 参数表格数据
			configList: [],
			// 弹出层标题
			title: "",
			// 是否显示弹出层
			open: false,
			// 日期范围
			dateRange: [],
			// 查询参数
			queryParams: {
				params: {},
				pageNum: 1,
				pageSize: 10,
				productName: undefined,
				productModel: undefined,
				clientName: undefined,
				productNumber: undefined,
				repairNumber: undefined,
				productName: null,
				productModel: null,
				bNumber: null,
				receiptTime: null,
				productQuantity: null,
				approvalStatus: null,
				retirementRepairlStatus: null,
				planFlag: null,
				technologyCode: null,
				technologyName: null,
				technologyDictCode: null,
				technologyStatus: null,
				malfunctionStatus: null,
				malfunctionVerifyTime: null,
				maintenanceCategoryId: null,
				maintenanceCategoryName: null,
				failureMode: null,
				failureRemark: null,
				processNumber: null,
				distributionStationStatus: null,
				workshopSectionId: null,
				workshopSectionName: null,
				militaryInspectionStatus: null,
				materialGenerateStatus: null,
				armyExamineTime: null,
				malfunctionApprovalStatus: null,
				outPutWarehouseStatus: null,
				putTime: null,
				outTime: null,
				packagDeliverStatus: null,
				deliverTime: null,
				retirementRepairlTime: null,
				curriculumVitae: null,
				repairPrecautions: null,
				specialStatus: null,
				specialCondition: null,
				urgencyFlag: null,
				processNumberTime: null,
				maintenanceTicketTime: null,
				packageTime: null,
				pleaseCheckStatus: null,
				pleaseCheckTime: null,
				disassembleTime: null,
				cleanTime: null,
				appearanceInspectionTime: null,
				specialExaminationTime: null,
				grindingRepairTime: null,
				sprayLacquerTime: null,
				surfaceTime: null,
				flawTime: null,
				replacementTime: null,
				materialsTime: null,
				assemblyTime: null,
				contractNumber: null,
				settleAccountStatus: null,
				productQualifiedStatus: null,
				plantArmyExamineTime: null,
				dataValidationStatus: null,
				retirementRepairlStatus: null,
				retirementRepairReason: null,
				retirementRepairlTime: null
			},
			// 表单参数
			form: { fileName: "", sheetName: "" }
		}
	},
	// created() { this.getSize()},
	activated() {
		// this.getSize()
	},
	watch: {
		showSearch(newVal, oldVal) {
			if (!newVal) {
				this.hasShowVisible = false
			}
			this.setHeight()
		},
		"$route.query": {
			handler(newQuery, oldQuery) {
				console.log(newQuery)
				this.hasShowVisible = this.$route.query.hasShowVisible === 'true';
				if (newQuery.queryData) {
					if (Object.keys(newQuery.queryData).length === 0) {
						this.resetForm("queryForm")
						// this.getSize()
					} else {
						this.queryParams = { ...this.queryParams, ...JSON.parse(newQuery.queryData) }
						// this.getSize()
					}
				} this.getSize()
			},
			immediate: true, // 立即执行一次
			deep: true // 深度监听
		}
	},

	methods: {
		getSize() {
			getcolumn({ pageName: "Pagination55" }).then(response => {
				this.queryParams.pageSize = response.data.length ? (response.data[0].limit ? response.data[0].limit : 10) : 10
				this.getList()
			})
		},
		handleAttachment(row) {
			this.$router.push({
				path: "/attachment/attachmentUpload",
				query: {
					TableId: row.id,
					paths: "/schedule/schedule",
					typeId: 5,
					perm: "schedule:scheduleList:file",
					repairNumber: row.repairNumber,
					productName: row.productName,
					productModel: row.productModel,
					hasShowVisible: this.hasShowVisible,
					show: true,
					// queryParams: JSON.stringify(this.queryParams)
				}
			})
		},
		/** 删除按钮操作 */
		handleDelete(row) {
			const ids = row.id || this.ids
			this.$modal
				.confirm("是否确认删除返修单产品数据项？")
				.then(function () {
					return delRepairProduct(ids)
				})
				.then(() => {
					this.getList()
					this.$modal.msgSuccess("删除成功")
				})
				.catch(() => { })
		},
		closeOpen(e) {
			this.ImportOpen = false
			if (e) {
				this.getList()
			}
		},
		handleImport() {
			this.importUrl = "/erp/repairProduct/importData"
			this.downLoadTemplete = {
				url: "/erp/repairProduct/importTemplate",
				title: "返修产品_模板"
			}
			this.ImportTitle = "导入产品"
			this.ImportOpen = true
		},
		selectAll() {
			this.names = [
				"repairNumber",
				"productRepresentativeName",
				"clientName",
				"productName",
				"productModel",
				"productNumber",
				"receiptTime",
				"malfunctionVerifyTime",
				"maintenanceCategoryName",
				"failureMode",
				"curriculumVitae",
				"failureRemark",
				"maintenanceTicketTime",
				"processNumberTime",
				"processNumber",
				"repairPrecautions",
				"bNumber",
				"disassembleTime",
				"cleanTime",
				"appearanceInspectionTime",
				"specialExaminationTime",
				"sprayLacquerTime",
				"surfaceTime",
				"materialsTime",
				"assemblyTime",
				"armyExamineTime",
				"packageTime",
				"deliverTime",
				"specialStatus",
				"specialCondition",
				"urgencyFlag",
				"retirementRepairlStatus",
				"retirementRepairReason",
				"retirementRepairlTime"
			]
		},
		// 表格按下
		mousedownTable(event) {
			const target = event.target
			// 判断target的class属性确定是否点击在复选框上
			if (target.classList.contains("el-checkbox__inner")) {
				this.currentEnterRow && this.$refs.table.toggleRowSelection(this.currentEnterRow)
				this.isMousedownTable = true
			}
		},
		// 单击表格行
		row_click(row, column, event) {
			if (column && column.label == "操作") {
				return
			} else {
				this.$refs.table.toggleRowSelection(row)
			}
		},

		// 进入单元格
		cell_mouse_enter(row, column, cell, event) {
			this.isMousedownTable && this.$refs.table.toggleRowSelection(row)
			this.currentEnterRow = row
		},
		// 离开单元格
		cell_mouse_leave(row, column, cell, event) {
			this.currentEnterRow = null
		},
		// 鼠标弹起或者离开表格
		mouseupTable(d) {
			this.isMousedownTable = false
		},
		rowClassName({ row, rowIndex }) {
			// return 'background:red';
			// 判断当前行是否在选中行数组中
			return this.rows.some(r => r == row) ? "highlight-row" : ""
		},
		setHeight() {
			if (!this.showSearch && !this.hasShowVisible) {
				this.heights = "72vh"
			}
			if (this.showSearch && !this.hasShowVisible) {
				this.heights = "67vh"
			}
		},
		showVisible() {
			this.hasShowVisible = !this.hasShowVisible
		},
		// 单击表格行
		row_click(row, column, event) {
			if (column && column.label == "操作") {
				return
			} else {
				this.$refs.table.toggleRowSelection(row)
			}
		},
		changeTableData() {
			this.$nextTick(() => {
				this.$refs.table.doLayout()
			})
		},

		submitFormEdit() {
			updaterepairProduct(this.editForm).then(res => {
				this.openedit = false
				this.$modal.msgSuccess("修改成功")
				this.getList()
			})
		},
		handleUpdate(row) {
			getrepairProduct(row.id).then(res => {
				this.editForm = res.data
				this.openedit = true
			})
		},
		submitForm() {
			this.$refs["form"].validate(valid => {
				if (valid) {
					this.form.ids = this.ids.join(",")
					this.form.columnNames = this.names.join(",")
					const loading = this.$loading({
						lock: true,
						text: "Loading",
						spinner: "el-icon-loading",
						background: "rgba(0, 0, 0, 0.7)"
					})
					downloadFileGET("/erp/repairProduct/export", this.form).finally(() => {
						this.open = false
						this.selval = undefined
						loading.close()
						this.getList()
					})
				}
			})
		},
		handleExport() {
			this.form.fileName = "返修单表"
			this.form.sheetName = "返修单"
			this.names = []
			this.open = true
		},

		/** 查询参数列表 */
		getList() {
			this.loading = true
			repairProductSumList(this.queryParams).then(response => {
				this.configList = response.rows
				this.total = response.total
				this.loading = false
			})
		},
		// 取消按钮
		cancel() {
			this.selval = undefined
			this.open = false
			this.reset()
		},
		// 表单重置
		reset() {
			this.form = {
				id: undefined,
				fileName: undefined,
				sheetName: undefined,
				productName: undefined,
				productModel: undefined,
				clientName: undefined,
				productNumber: undefined,
				repairNumber: undefined,
				productName: null,
				productModel: null,
				bNumber: null,
				receiptTime: null,
				productQuantity: null,
				approvalStatus: null,
				retirementRepairlStatus: null,
				planFlag: null,
				technologyCode: null,
				technologyName: null,
				technologyDictCode: null,
				technologyStatus: null,
				malfunctionStatus: null,
				malfunctionVerifyTime: null,
				maintenanceCategoryId: null,
				maintenanceCategoryName: null,
				failureMode: null,
				failureRemark: null,
				processNumber: null,
				distributionStationStatus: null,
				workshopSectionId: null,
				workshopSectionName: null,
				militaryInspectionStatus: null,
				materialGenerateStatus: null,
				armyExamineTime: null,
				malfunctionApprovalStatus: null,
				outPutWarehouseStatus: null,
				putTime: null,
				outTime: null,
				packagDeliverStatus: null,
				deliverTime: null,
				retirementRepairlTime: null,
				curriculumVitae: null,
				repairPrecautions: null,
				specialStatus: null,
				specialCondition: null,
				urgencyFlag: null,
				processNumberTime: null,
				maintenanceTicketTime: null,
				packageTime: null,
				pleaseCheckStatus: null,
				pleaseCheckTime: null,
				disassembleTime: null,
				cleanTime: null,
				appearanceInspectionTime: null,
				specialExaminationTime: null,
				grindingRepairTime: null,
				sprayLacquerTime: null,
				surfaceTime: null,
				flawTime: null,
				replacementTime: null,
				materialsTime: null,
				assemblyTime: null,
				contractNumber: null,
				settleAccountStatus: null,
				productQualifiedStatus: null,
				plantArmyExamineTime: null,
				dataValidationStatus: null
			}
			this.resetForm("form")
		},
		/** 搜索按钮操作 */
		handleQuery() {
			this.queryParams.params["receiptTimeStart"] = this.value1[0]
			this.queryParams.params["receiptTimeFinish"] = this.value1[1]
			this.queryParams.params["malfunctionVerifyTimeStart"] = this.value2[0]
			this.queryParams.params["malfunctionVerifyTimeFinish"] = this.value2[1]
			this.queryParams.params["maintenanceTicketTimeStart"] = this.value3[0]
			this.queryParams.params["maintenanceTicketTimeFinish"] = this.value3[1]
			this.queryParams.params["processNumberTimeStart"] = this.value4[0]
			this.queryParams.params["processNumberTimeFinish"] = this.value4[1]
			this.queryParams.params["disassembleTimeStart"] = this.value5[0]
			this.queryParams.params["disassembleTimeFinish"] = this.value5[1]
			this.queryParams.params["cleanTimeStart"] = this.value6[0]
			this.queryParams.params["cleanTimeFinish"] = this.value6[1]
			this.queryParams.params["appearanceInspectionTimeStart"] = this.value7[0]
			this.queryParams.params["appearanceInspectionTimeFinish"] = this.value7[1]
			this.queryParams.params["specialExaminationTimeStart"] = this.value8[0]
			this.queryParams.params["specialExaminationTimeFinish"] = this.value8[1]
			this.queryParams.params["sprayLacquerTimeStart"] = this.value9[0]
			this.queryParams.params["sprayLacquerTimeFinish"] = this.value9[1]
			this.queryParams.params["surfaceTimeStart"] = this.value10[0]
			this.queryParams.params["surfaceTimeFinish"] = this.value10[1]
			this.queryParams.params["materialsTimeStart"] = this.value11[0]
			this.queryParams.params["materialsTimeFinish"] = this.value11[1]
			this.queryParams.params["assemblyTimeStart"] = this.value12[0]
			this.queryParams.params["assemblyTimeFinish"] = this.value12[1]
			this.queryParams.params["armyExamineTimeStart"] = this.value13[0]
			this.queryParams.params["armyExamineTimeFinish"] = this.value13[1]
			this.queryParams.params["packageTimeStart"] = this.value14[0]
			this.queryParams.params["packageTimeFinish"] = this.value14[1]
			this.queryParams.params["deliverTimeStart"] = this.value15[0]
			this.queryParams.params["deliverTimeFinish"] = this.value15[1]

			this.queryParams.params["retirementRepairlTimeStart"] = this.value16[0]
			this.queryParams.params["retirementRepairlTimeFinish"] = this.value16[1]
			this.queryParams.pageNum = 1
			this.saveSearchState()    
			this.getList()
		},
		resetQueryAll() {
			this.names = []
			this.value1 = []
			this.value2 = []
			this.value3 = []
			this.value4 = []
			this.value5 = []
			this.value6 = []
			this.value7 = []
			this.value8 = []
			this.value9 = []
			this.value10 = []
			this.value11 = []
			this.value12 = []
			this.value13 = []
			this.value14 = []
			this.value15 = []
			this.value16 = []
			this.dateRange = []
			this.queryParams = {
				params: {},
				pageNum: 1,
				pageSize: 10,
				productName: undefined,
				productModel: undefined,
				clientName: undefined,
				productNumber: undefined,
				repairNumber: undefined,
				productName: null,
				productModel: null,
				bNumber: null,
				receiptTime: null,
				productQuantity: null,
				approvalStatus: null,
				retirementRepairlStatus: null,
				planFlag: null,
				technologyCode: null,
				technologyName: null,
				technologyDictCode: null,
				technologyStatus: null,
				malfunctionStatus: null,
				malfunctionVerifyTime: null,
				maintenanceCategoryId: null,
				maintenanceCategoryName: null,
				failureMode: null,
				failureRemark: null,
				processNumber: null,
				distributionStationStatus: null,
				workshopSectionId: null,
				workshopSectionName: null,
				militaryInspectionStatus: null,
				materialGenerateStatus: null,
				armyExamineTime: null,
				malfunctionApprovalStatus: null,
				outPutWarehouseStatus: null,
				putTime: null,
				outTime: null,
				packagDeliverStatus: null,
				deliverTime: null,
				retirementRepairlTime: null,
				curriculumVitae: null,
				repairPrecautions: null,
				specialStatus: null,
				specialCondition: null,
				urgencyFlag: null,
				processNumberTime: null,
				maintenanceTicketTime: null,
				packageTime: null,
				pleaseCheckStatus: null,
				pleaseCheckTime: null,
				disassembleTime: null,
				cleanTime: null,
				appearanceInspectionTime: null,
				specialExaminationTime: null,
				grindingRepairTime: null,
				sprayLacquerTime: null,
				surfaceTime: null,
				flawTime: null,
				replacementTime: null,
				materialsTime: null,
				assemblyTime: null,
				contractNumber: null,
				settleAccountStatus: null,
				productQualifiedStatus: null,
				plantArmyExamineTime: null,
				dataValidationStatus: null,
				retirementRepairlStatus: null,
				retirementRepairReason: null,
				retirementRepairlTime: null
			}
			// this.resetForm("queryForm")
			this.clearSearchCache() 
			this.handleQuery()
		},
		/** 重置按钮操作 */
		resetQuery() {
			this.names = []
			this.value1 = []
			this.value2 = []
			this.value3 = []
			this.value4 = []
			this.value5 = []
			this.value6 = []
			this.value7 = []
			this.value8 = []
			this.value9 = []
			this.value10 = []
			this.value11 = []
			this.value12 = []
			this.value13 = []
			this.value14 = []
			this.value15 = []
			this.value16 = []
			this.dateRange = []
			this.resetForm("queryForm")
			this.clearSearchCache() 
			this.handleQuery()
		},
		// 多选框选中数据
		handleSelectionChange(selection) {
			this.ids = selection.map(item => item.id)
			this.rows = selection
			this.single = selection.length != 1
			this.multiple = !selection.length
		}
	}
}
</script>

<style lang="scss" scoped>
.contentsRepairNumber {
	display: flex;
	justify-content: space-between;
	padding: 10px;

	>div {
		width: 50%;
	}
}

.custom-tooltip-content {
	color: #606266;
	background-color: #fff;
	padding: 1px;
	width: 1000px;
	border-radius: 2px;
}

::v-deep .el-table__fixed-header-wrapper .fixed-width {
	width: 100px !important;
}

::v-deep .highlight-row {
	background: #d1eded;
}
</style>
